package common;

import java.io.Serializable;

/**
 * 消息对象
 */
public class Message implements Serializable {
    private static final long serialVersionUID = 1L;
    private String sender;// 发送者
    private String getter;// 接收者
    private String content;// 发送内容
    private String sendTime;// 发送时间
    private String messType;// 消息类型

    // 文件传输相关
    private byte[] data;// 发送文件用的字节数组
    private int dataLen;// 文件长度
    private String src;// 源文件路径

    // 用户注册相关
    private user user;

    public user getUser() {
        return user;
    }

    public void setUser(user user) {
        this.user = user;
    }

    public Message(String sender, String getter, String content, String sendTime, String messType) {
        this.sender = sender;
        this.getter = getter;
        this.content = content;
        this.sendTime = sendTime;
        this.messType = messType;
    }

    public Message() {
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public int getDataLen() {
        return dataLen;
    }

    public void setDataLen(int dataLen) {
        this.dataLen = dataLen;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getGetter() {
        return getter;
    }

    public void setGetter(String getter) {
        this.getter = getter;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getMessType() {
        return messType;
    }

    public void setMessType(String messType) {
        this.messType = messType;
    }

}
